import {
  delivery_query
} from '../../../../api/shipping'
Page({

  /**
   * 页面的初始数据
   */
  data: {
    axis: []
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    console.log(options.trackimgno)
    this.loadList(options.trackimgno)
  },

  loadList(data) {
    var _this = this
    delivery_query({ trackingNo: data }).then(res => {
      console.log(res)
      if (res.type == 'success') {
        _this.data.axis = res.data.data
        _this.setData({
          axis: _this.data.axis
        })
      }
    }).catch(error => {
      wx.showToast({
              icon: "none",
        title: error.content,
      })
    })
  },
})